<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
    <%- include ../shop/common.ejs%>
    <style>
        .goods_img{
            width: 30%;
            float: left;
            /*background-image: url("http://123.57.72.99:3000/images/goods/5881b28b2f6e8730d409a251e83c9a0f.jpg");*/
            background-repeat: no-repeat;
            background-size: cover;
            height: 80px;
            width: 80px;
            margin: 10px 10px 10px 10px;
        }
    </style>
</head>
<body>
<div class="container">
    <div class="row">
        <div  class="col-xs-12" style="padding: 10px 0 10px 15px"><a href="#" onclick="history.go(-1);"><button type="button" class="btn btn-default"><< 返回</button></a>&nbsp;&nbsp;</div>
    </div>
    <form action="/goods/edit" method="post" class="form-horizontal" role="form" style="padding-top: 15px;">
        <div class="form-group">
            <div class="col-sm-offset-2 col-sm-10">
                <button type="submit" class="btn btn-default btn-block">确认提交</button>
            </div>
        </div>

        <div class="form-group">
            <label for="firstname" class="col-sm-2 control-label">商品名称</label>
            <div class="col-sm-10">
                <input type="text" class="form-control" id="title" name="title" value="<%=goods.title%>"
                       placeholder="请输入">
            </div>
        </div>
        <div class="form-group">
            <label for="lastname" class="col-sm-2 control-label">描述</label>
            <div class="col-sm-10">
                <input type="text" class="form-control" id="description" name="description" value="<%=goods.description%>"
                       placeholder="请输入">
            </div>
        </div>

        <div class="form-group">
            <label for="lastname" class="col-sm-2 control-label">产品编号</label>
            <div class="col-sm-10">
                <input type="text" class="form-control" id="productsn" name="productsn" value="<%=goods.productsn%>"
                       placeholder="请输入">
            </div>
        </div>

        <div class="form-group">
            <label for="lastname" class="col-sm-2 control-label">价格（总参与人次）</label>
            <div class="col-sm-10">
                <input type="text" class="form-control" id="productprice" name="productprice" value="<%=goods.productprice%>"
                       placeholder="请输入">
            </div>
        </div>
        <div class="form-group">
            <label for="lastname" class="col-sm-2 control-label">参与积分</label>
            <div class="col-sm-10">
                <input type="text" class="form-control" id="credit" name="credit" value="0" value="<%=goods.credit%>"
                       placeholder="请输入">
            </div>
        </div>

        <div class="form-group">
            <label for="lastname" class="col-sm-2 control-label">是否上架</label>
            <div class="col-sm-10">
                <label class="checkbox-inline">
                    <input type="radio" name="status" id="status1"
                           value="0" checked>上架
                </label>
                <label class="checkbox-inline">
                    <input type="radio" name="status" id="status2"
                           value="1">不上架
                </label>
            </div>
        </div>

        <div class="form-group">
            <label for="lastname" class="col-sm-2 control-label">商品主图</label>
            <div class="col-sm-10 col-sm-offset-2">
                    <%goods.thumb.split(',').forEach(function(imgurl){%>
                    <div class="goods_img"  style="background-image: url('<%=imgurl%>');"></div>
                    <%})%>
            </div>
            <div class="col-sm-10 col-sm-offset-2">
                <div id="demo" class="demo"></div>
                <input id="thumb" name="thumb"  value="<%=goods.thumb%>" style="display: none;"/>
                <input id="thumb" name="oldthumb"  value="<%=goods.thumb%>" style="display: none;"/>
                <input id="goodsid" name="id"  value="<%=goods.id%>" style="display: none;"/>
            </div>
        </div>
    </form>
</div><!---->



</body>

<link rel="stylesheet" href="/js/zyupload/control/css/zyUpload.css" type="text/css">
<!-- 引用核心层插件 -->
<script src="/js/zyupload/core/zyFile.js"></script>
<!-- 引用控制层插件 -->
<script src="/js/zyupload/control/js/zyUpload.js"></script>
<!-- 引用初始化JS -->
<script src="/js/zyupload/core/lanrenzhijia.js"></script>

<script>

</script>
</html>